package test.aop.ascept;


import com.why.simpleboot.core.annotation.aop.After;
import com.why.simpleboot.core.annotation.aop.Aspect;
import com.why.simpleboot.core.annotation.aop.Before;
import com.why.simpleboot.core.annotation.aop.Pointcut;
import com.why.simpleboot.core.annotation.ioc.Component;
import com.why.simpleboot.core.core.aop.entity.JointPoint;
import lombok.extern.slf4j.Slf4j;
import org.apache.logging.log4j.core.config.Order;

import java.lang.reflect.Method;

@Aspect
@Order(value = 1)
@Slf4j
public class HeadMasterAspect {

    @Pointcut("test.aop.service.StudentService")
    public void oneAspect() {

    }

    @Before
    public void beforeAction(JointPoint params) {
        log.info("aspect headmaster : before to do something");
    }

    @After
    public void afterAction(Object result, JointPoint joinPoint) {
        log.info("aspect headmaster after to do something");
    }
}
